package com.kgc.service;

import com.kgc.bean.DiscountTrick;
import com.kgc.bean.OrderInfo;
import com.kgc.bean.OrderItem;
import com.kgc.bean.UserReviverInfo;
import com.kgc.util.ReturnResult;
import org.springframework.core.annotation.Order;

import java.util.List;

public interface OrderService {
   OrderInfo queryOrderInfoByOrderId(String orderId);

   List<OrderInfo> queryAllOrdersByOrderState(Integer userId, Integer orderStateCode);

   List<OrderInfo> queryAllOrders(Integer userId);


   /**
   *@ClassName: OrderService
   *@Description 获得用户的地址
   *@Author lzy
   *@Date 2021/6/24
   */
   UserReviverInfo queryGetUserReviverInfoById(Integer id);

   /**
   *@ClassName: OrderService
   *@Description 异步保存订单商品详情到数据库
   *@Author lzy
   *@Date 2021/6/24
   */
   void querySaveOrderGoodsItem(List<OrderItem> orderItems);


   /**
   *@ClassName: OrderService
   *@Description 查询优惠卷
   *@Author lzy
   *@Date 2021/6/25
   */
   DiscountTrick selectDiscountTrickById(Integer id);


   /**
   *@ClassName: OrderService
   *@Description 异步保存订单信息
   *@Author lzy
   *@Date 2021/6/25
   */
   void  querySaveOrderGoodsInfo(OrderInfo orderInfo);


   /**
   *@ClassName: OrderService
   *@Description 判断用户的优惠卷是否可以使用
   *@Author lzy
   *@Date 2021/6/29
   */
   Boolean justyUserHaveDiscountTick(Integer userId,Integer discountId);


   /**
   *@ClassName: OrderService
   *@Description 判断优惠卷有没有过期
   *@Author lzy
   *@Date 2021/6/29
   */
   Boolean justyUserUsedDiscountTick(Integer userId,Integer discountId);


   /**
    *@ClassName: OrderService
    *@Description 更新
    *@Author lzy
    *@Date 2021/6/30
    */

   Boolean queryUpdateOrderInfoByLoggistics(OrderInfo orderInfo);




}
